<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Shop.Master" Inherits="Shop.Framework.Page.ProductListPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <shopControls:headBuilder runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <%if (IsCategory) { %>
    <h2>
        <%=CurrentCategory.Name %></h2>
    <%} %>
    <%if (IsDesigner) { %>
    <h2>
        <%=CurrentDesigner.Name %></h2>
    <%} %>
    <br />
    <center>
        <shopControls:pagingBuilder runat="server" />
        <hr />
        <div style="margin: 0 0 0 0;">
            <table>
                <%int index = 0; %>
                <%for (int start = 0; start < Model.Count; start++ ) {%>
                <%if (index == 0) {
                  index += 1; %>
                <tr>
                    <%} %>
                    <td style="padding: 5px">
                        <%Html.RenderPartial("~/controls/ProductListItemControl.ascx", Model[start]); %>
                    </td>
                    <%if (index == 3) {
                  index = 0; %>
                </tr>
                <%} %>
                <%index += 1; %>
                <%} %>
            </table>
        </div>
        <hr />
        <shopControls:pagingBuilder runat="server" />
    </center>
    <br />
</asp:Content>
